import requests


class EsUtils:


    def __init__(self,url,index):
        self.url = url
        self.index = index
        self.session = requests.session()



    def find(self,filter):
        url = self.url = '/' + self.index
        r = self.session.post(self.url,json=filter)
        print(r)


if __name__ == '__main__':
    filter = {}
    EsUtils("http://10.63.4.194:29200","cgbundle-key-task-*").find(filter=filter)